#ifndef USERINTERFACEZZL_H
#define USERINTERFACEZZL_H

#include <header.h>
#include <QMainWindow>
#include <QObject>
#include <QWidget>
#include <userZZL.h>
#include <groupZZL.h>

class userinterfaceZZL : public QMainWindow
{
    Q_OBJECT
public:
    explicit userinterfaceZZL(QString username, QWidget *parent = nullptr);
    QString getUserName();
    QLabel* usernameLabel;
signals:


private slots:
    void onStartChatButtonClicked();
    void onDisplayDetailsButtonClicked();
private:
    QString username;


    std::vector<userZZL*> peerVec;
    std::vector<groupZZL*> groupVec;

    QVBoxLayout *mainLayout;
    QWidget *centralWidget;
    QListWidget* peerList;
    QListWidget* groupList;
    QPushButton* startChatButton;
    QPushButton* displayDetailsButton;
    // QPushButton* clearSelectionButton;

    virtual QString getWelcomeLabel(); // 根据服务多态的形成欢迎语

    void initData();
    void initLayout();
};

#endif // USERINTERFACEZZL_H
